package blog.pic;

import java.util.ArrayList;
import java.util.List;

import com.blue.core.util.JsonUtil;
import com.blue.crawler.annotation.CrawlerConfig;
import com.blue.crawler.engine.Download;
import com.blue.crawler.engine.FileDownload;
import com.blue.crawler.engine.FileModel;

public class MmjpgDownloadMain
{
	public MmjpgDownloadMain()
	{
	}
	
	public static void main(String[] args) throws Exception
	{
		List<String> urlList = new ArrayList<>();
		urlList.add("http://img.mmjpg.com/2017/1068/1.jpg");
		urlList.add("http://img.mmjpg.com/2017/1068/2.jpg");
		urlList.add("http://img.mmjpg.com/2017/1068/3.jpg");
		urlList.add("http://img.mmjpg.com/2017/1068/4.jpg");
		urlList.add("http://img.mmjpg.com/2017/1068/5.jpg");
		urlList.add("http://img.mmjpg.com/2017/1068/6.jpg");
		urlList.add("http://img.mmjpg.com/2017/1068/7.jpg");
		urlList.add("http://img.mmjpg.com/2017/1068/8.jpg");
		
		CrawlerConfig config = new CrawlerConfig();
		config.setThumbHeight(200);
		config.setThumbWidth(200);
		
		Download download = new FileDownload("F:/home/opt");
		for (String url : urlList)
		{
			FileModel fileModel = download.download(url, null, config);
			System.out.println(JsonUtil.output(fileModel));
			Thread.sleep(3000);
		}
		
	}
	
}
